﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MVC_DaLatServices.Models.Helper;
using MVC_DaLatServices.Models;
namespace UnitTest
{
    [TestClass]
    public class UnitTest1
    {
        private DaLatServiceEntities db = new DaLatServiceEntities();
        [TestMethod]
        public void TestMethod1()
        {
            string expected = "Nguyen Manh Cuong";
            string actual = HelperLink.ConverWordToUnmark("Nguyễn Mạnh Cường");
            Assert.AreEqual(expected, actual);
        }
        [TestMethod]
        public void Test_toUpper()
        {
            string expected = "Nguyen Manh Cuong";
            string actual = HelperLink.toUpper("nguyen manh cuong");
            Assert.AreEqual(expected, actual);
        }
        [TestMethod]
        public void Test_ToCotroller()
        {
            string expected = "Bất động sản";
            Category parent = db.Categories.Find(1);
            Category actual = HelperLink.GetParent(13);
            Assert.AreEqual(expected, actual);
        }

    }
}
